﻿/**********************************************************************
 * @file   FITKFEJunctionPoint.h
 * @brief  FE点连接
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2025-01-21
 *********************************************************************/
#ifndef _FITKFEJunctionPoint_H
#define _FITKFEJunctionPoint_H

#include "FITKAbstractJunction.h"

namespace Acoustics
{
    /**
     * @brief  FE点连接
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date   2025-01-21
     */
    class FITKAcousticsModelAPI FITKFEJunctionPoint :public FITKAbstractJunction
    {
        FITKCLASS(Acoustics, FITKFEJunctionPoint);
        Q_OBJECT;
    public:
        /**
         * @brief    构造函数
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-21
         */
        explicit FITKFEJunctionPoint() = default;
        /**
         * @brief    析构函数
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-21
         */
        virtual ~FITKFEJunctionPoint() = default;
        /**
         * @brief    获取耦合对象类型
         * @return   JunctionType       对象类型
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-21
         */
        virtual FITKAbstractJunction::JunctionType getJunctiontType() override;
        /**
         * @brief    获取点的ID
         * @return   int       id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-11
         */
        int getPointID();
        /**
         * @brief    设置点的ID
         * @param[i] id        点id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-11
         */
        void setPointID(int id);
        /**
         * @brief    设置连接点
         * @param[i] node1 
         * @param[i] node2 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-21
         */
        void setConnectNodeID(int node1, int node2);
        /**
         * @brief    获取连接点1
         * @return   int
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-22
         */
        int getConnectNode1ID();
        /**
         * @brief    获取连接点2
         * @return   int
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-22
         */
        int getConnectNode2ID();

    protected:
        /**
         * @brief    更新连接
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-21
         */
        virtual void updateConnect() override;

    protected:
        /**
         * @brief  点的id
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2025-01-21
         */
        int _pointID = -1;
        /**
         * @brief  连接点的数据
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2025-01-21
         */
        QPair<int, int> _connectPointID{ -1, -1 };
    };
}

#endif
